package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import cn.wolfcode.trip.base.query.UserProfilesQueryObject;
import cn.wolfcode.trip.base.query.UserQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface ITravelService {
    // 高级查询分页查询

    /**
     * 根据id查询游记
     * @param id 游记的id
     * @return 游记对象
     */
    Travel get(Long id);
    PageInfo<Travel> query(TravelQueryObject qo);
    void savaOrUpdate(Travel travel);
    void changeState(Long id, Integer state);

    Map<String,Object> getCounts(String keyword);
    /**
     * 查询用户游记
     * @param qo
     * @return
     */
    PageInfo queryforTravels(UserProfilesQueryObject qo);
}
